﻿<%@ WebHandler Language="C#" Class="get_regusers" %>

using System;
using System.Web;
using TSqlServer;

public class get_regusers : IHttpHandler {
    
    public void ProcessRequest (HttpContext context) {
        
        int result = 0;

        string sSql = "select count(*) from t_user where status=1";
        TSqlDBReader oRS = new TSqlDBReader(sSql);
        if (oRS.FDataReader.Read())
        {
            result = (int)oRS.FDataReader.GetValue(0);
        }
        oRS.Free();

        context.Response.ContentType = "text/plain";
        context.Response.Write(result.ToString());
    }
 
    public bool IsReusable {
        get {
            return false;
        }
    }

}